package com.re.pojo;

import java.util.ArrayList;
import java.util.List;

/*
 * 玩家
 */
public class Player {
    private String name;
    private List<Card> cards;

    public Player(String name) {
        this.name = name;
        this.cards=new ArrayList<>();
    }
    public String getName(){
        return this.name;
    }

    public void receiveCard(Card card){
        this.cards.add(card);
    }

    public void showCards(){

        System.out.println(this.name + ": ");
        for (Card every: cards){
            System.out.print(every+"");
        }
        System.out.println();
    }
}
